﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApp_bootstrap.clases;

namespace WebApp_bootstrap
{
    public partial class Default : System.Web.UI.Page
    {
        List<Persona> lista = new List<Persona>();
        protected void Page_Load(object sender, EventArgs e)
        {            
            lista.Add(new Persona("h@h.cl","J"));
            lista.Add(new Persona("k@k.cl", "k"));
            lista.Add(new Persona("r@r.cl", "r"));
            GridView1.DataSource = lista;
            GridView1.DataBind();
        }
        protected void btnEnviar_Click(object sender, EventArgs e)
        {
            lista.Add(new Persona(txtMail.Text, txtNombre.Text));
            GridView1.DataSource = lista;
            GridView1.DataBind();
           
        }
    }
}